/**
 * Copyright (c) 2017,安徽皖通科技股份有限公司 All rights reserved.
 * @data:2017年10月9日
 * @author:MaShibo
 */
package com.wttech.dzzf.process.model.issuer;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.dao.annotation.PrimaryKey;
import com.wtkj.vo.AbstractValueObject;

import cn.com.taiji.sdk.model.comm.protocol.annotation.EnumValidate;
import cn.com.taiji.sdk.model.comm.protocol.annotation.TimeValidate;
import cn.com.taiji.sdk.model.comm.protocol.annotation.TimeValidate.TimeType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 线上服务渠道信息
 * 
 * @date 2017年10月9日
 * @author MaShibo
 */
@Data
@EqualsAndHashCode(callSuper = false)
@DatabaseTable(tableName = "BS_ONLINE")
public class Online extends AbstractValueObject {
    
    
    /**
     * 
     */
    private static final long serialVersionUID = -2488715339515410667L;
    
    @PrimaryKey
    @Size(min = 15, max = 15, message = "id为15位数字")
    @NotNull(message = "id必填")
    private String id;
    
    @Size(max = 50, message = "name最大长度为50字符")
    @NotNull(message = "name必填")
    private String name;
    
    @Size(max = 150, message = "serviceItems最大长度为150字符")
    @NotNull(message = "serviceItems必填")
    private String serviceItems;
    
    @Size(max = 10, message = "startTime最大长度为10字符")
    @TimeValidate(type = TimeType.DATE, message = "startTime格式不正确")
    @NotNull(message = "startTime必填")
    private String startTime;
    
    @Size(max = 10, message = "endTime最大长度为10字符")
    @TimeValidate(type = TimeType.DATE, message = "endTime格式不正确")
    private String endTime;
    
    @EnumValidate(message = "operation不正确", regexp = "(1|2|3)")
    @NotNull(message = "operation必填")
    private Integer operation = 1;
}
